package demoMod.stsconsole.powers;

import demoMod.stsconsole.cards.AbstractCard;
import demoMod.stsconsole.core.AbstractCreature;
import demoMod.stsconsole.dungeons.AbstractDungeon;
import demoMod.stsconsole.helpers.DamageInfo;
import demoMod.stsconsole.interfaces.PostDrawSubscriber;

public class FireBreathingPower extends AbstractPower implements PostDrawSubscriber {
    public static final String ID = "FireBreathingPower";

    public FireBreathingPower(AbstractCreature owner, int amount) {
        super(ID, owner, amount);
    }

    @Override
    public String getUpdatedDescriptions() {
        return String.format(this.description, this.amount[0]);
    }

    @Override
    public void onCardDraw(AbstractCard card) {
        if (card.type == AbstractCard.CardType.STATUS || card.type == AbstractCard.CardType.CURSE) {
            AbstractDungeon.player.damageAllEnemies(new DamageInfo(this.amount[0], this.owner, DamageInfo.DamageType.THORNS));
        }
    }
}
